﻿<UserControl x:Class="ScrumTable.UI.View.WinTouch.UserControls.ItemControls.ListClickControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="Root"  Background="#FFE1F9FF" BorderBrush="Transparent" BorderThickness="0" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="60" d:DesignWidth="60" OpacityMask="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=CanClickOpacityMask}" >
    <Grid>        
        <Border CornerRadius="10" BorderBrush="{Binding Color, ElementName=Root}" Margin="1" BorderThickness="1">
            <Border.Style>
                <Style>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListBoxItem}}}" Value="True">
                            <Setter Property="Border.Background" Value="{Binding Color, ElementName=Root}"/>
                            <Setter Property="Border.Opacity" Value="0.6"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Border.Style>
        </Border>        
        <Label HorizontalAlignment="Center" VerticalAlignment="Center"  Margin="1" FontSize="12" Name="ControlText" Content="{Binding ElementName=Root, Path=Text}"/>
    </Grid>
</UserControl>
    